/**     
 * @Title: Message.java   
 * @Package me.xxy.mq   
 * @Description: TODO
 * @author weiwei 
 * @date 2018年5月30日 下午4:50:01   
 * @version V1.0     
 */
package me.xxy.mq.core;

import java.io.Serializable;

/**
 * @ClassName: Message
 * @Description: TODO
 * @author weiwei
 * @date 2018年5月30日 下午4:50:01
 * 
 */
public class Message implements Serializable {

	private static final long serialVersionUID = 7546411413719990195L;

	/** key值 **/
	private String key;

	/** 消息具体内容 **/
	private Object content;

	/** 执行失败次数 **/
	private Integer times;

	/** 过期时间 **/
	private Integer seconds;

	public Message() {
		super();
	}

	public Message(String key, Object content) {
		super();
		this.key = key;
		this.content = content;
		this.times = new Integer(0);
		this.seconds = new Integer(0);
	}

	/**
	 * @return the key
	 */
	public String getKey() {
		return key;
	}

	/**
	 * @param key
	 *            the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * @return the content
	 */
	public Object getContent() {
		return content;
	}

	/**
	 * @param content
	 *            the content to set
	 */
	public void setContent(Object content) {
		this.content = content;
	}

	/**
	 * @return the times
	 */
	public Integer getTimes() {
		return times;
	}

	/**
	 * @param times
	 *            the times to set
	 */
	public void setTimes(Integer times) {
		this.times = times;
	}

	/**
	 * @return the seconds
	 */
	public Integer getSeconds() {
		return seconds;
	}

	/**
	 * @param seconds
	 *            the seconds to set
	 */
	public void setSeconds(Integer seconds) {
		this.seconds = seconds;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Message [key=");
		builder.append(key);
		builder.append(", content=");
		builder.append(content);
		builder.append(", times=");
		builder.append(times);
		builder.append(", seconds=");
		builder.append(seconds);
		builder.append("]");
		return builder.toString();
	}
}
